package com.hrt.datasender.web.calSetting;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

import java.util.Date;

@SuppressWarnings("unchecked")
public class BdCalTimeModel extends BaseModel {

    private static final long serialVersionUID = 1L;


    public static String tableName = "BD_CAL_TIME";


    public static IField id = new Field(BdCalTimeModel.class,"ID",FieldType.String,true,true,false);

    public static IField paramCodeBus = new Field(BdCalTimeModel.class,"PARAM_CODE_BUS",FieldType.String,false,true,false);

    public static IField startTime = new Field(BdCalTimeModel.class,"START_TIME",FieldType.DateTime,false,true,false);

    public static IField endTime = new Field(BdCalTimeModel.class,"END_TIME",FieldType.DateTime,false,true,false);

    public static IField createtime = new Field(BdCalTimeModel.class,"CREATETIME",FieldType.DateTime,false,true,false);

    public void setId(String value){
        setFieldValue(BdCalTimeModel.id.getFieldName(), value);
    }

    public String getId(){
        Object value = getFieldValue(BdCalTimeModel.id.getFieldName());
        return getValueConver().converToString(value);
    }

    public void setParamCodeBus(String value){
        setFieldValue(BdCalTimeModel.paramCodeBus.getFieldName(), value);
    }

    public String getParamCodeBus(){
        Object value = getFieldValue(BdCalTimeModel.paramCodeBus.getFieldName());
        return getValueConver().converToString(value);
    }

    public void setStartTime(Date value){
        setFieldValue(BdCalTimeModel.startTime.getFieldName(), value);
    }

    public Date getStartTime(){
        Object value = getFieldValue(BdCalTimeModel.startTime.getFieldName());
        return getValueConver().converToDate(value);
    }

    public void setEndTime(Date value){
        setFieldValue(BdCalTimeModel.endTime.getFieldName(), value);
    }

    public Date getEndTime(){
        Object value = getFieldValue(BdCalTimeModel.endTime.getFieldName());
        return getValueConver().converToDate(value);
    }

    public void setCreatetime(Date value){
        setFieldValue(BdCalTimeModel.createtime.getFieldName(), value);
    }

    public Date getCreatetime(){
        Object value = getFieldValue(BdCalTimeModel.createtime.getFieldName());
        return getValueConver().converToDate(value);
    }


    public String getTableName() {
        return tableName;
    }


    public boolean isNeedCache() {
        return false;
    }

}